package com.easypan.entity.enums;

import lombok.Getter;

/**
 * @author VectorX
 * @version 1.0.0
 * @description 验证正则表达式枚举
 * @date 2024/07/23
 * @see Enum
 */
@Getter
public enum VerifyRegexEnum
{
    NO("", "不校验"),
    EMAIL("^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$", "邮箱"),
    PASSWORD("^(?=.*\\d)(?=.*[a-zA-Z])[\\da-zA-Z~!@#$%^&*_]{8,}$", "只能是数字，字母，特殊字符 8-18位");

    private String regex;
    private String desc;

    VerifyRegexEnum(String regex, String desc) {
        this.regex = regex;
        this.desc = desc;
    }

}
